<template>
  <div>
    <div>detail {{ $route.query.id }} - {{ detail }}</div>
    <button @click="closeDetail">关闭详情</button>
  </div>
</template>

<script>
import { _post } from "@/api";

export default {
  name: "card_detail",
  data() {
    return {
      detail: {}
    };
  },
  created() {
    this.getDetail(this.$route.query.id);
  },
  methods: {
    //获取数据
    getDetail(id) {
      console.log(_post, id);
    },
    //关闭详情
    closeDetail() {
      // this.$parent.show_detail = false;
      this.$router.back();
    },
    //保存/编辑
    edit() {
      //1 更新数据库
      //2 更新State
      //3 更新this.detail
    },
    //显示调床
    showChangeBedWin() {},
    //更新调床
    editChangeBed() {}
  }
};
</script>

<style scoped></style>
